<!-- jquery easyui -->
<%@ page language="java"  pageEncoding="UTF-8"%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/extend_default.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/gray/easyui.css" rel="stylesheet" title="gray">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/green/easyui.css" rel="stylesheet" title="green">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/orange/easyui.css" rel="stylesheet" title="orange">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/default/easyui.css" rel="stylesheet" title="blue">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/pink/easyui.css" rel="stylesheet" title="pink">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/comstyle/easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
 //弹出信息窗口 
//title:标题 msgString:提示信息 msgType:信息类型 [error,info,question,warning]

function showMsg(msgString, msgType) {
	$.messager.alert("提示", msgString, msgType);
}


function showProcess(isShow, title, msg) {  
	if (!isShow) {
	$.messager.progress('close');
	return; 
	} 
	var win = $.messager.progress({ 
	 title: "提示",  
	 msg: msg 
	}); 
}


function showConfirm(title, msg, callback) {
	$.messager.confirm(title, msg, function (r) {
		if (r) {
			if (jQuery.isFunction(callback))
			callback.call();
		} 
	}); 
}


var webpath = "${pageContext.request.contextPath}";
//所有切换样式
$(function() {
	$('.styleswitch').click(function()
	{
		switchStylestyle(this.getAttribute("rel"));
		return false;
	});
	var c = readCookie('style');
	if (c) switchStylestyle(c);
});
function switchStylestyle(styleName)
{
	$('link[rel=stylesheet][title]').each(function(i) 
	{
		this.disabled = true;
		if (this.getAttribute('title') == styleName) this.disabled = false;
	});
	
	$("iframe").contents().find('link[rel=stylesheet][title]').each(function(i) 
	{
		this.disabled = true;
		if (this.getAttribute('title') == styleName) this.disabled = false;
	});
	createCookie('style', styleName, 365);
}
//cookie
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function eraseCookie(name)
{
	createCookie(name,"",-1);
}
// /cookie functions
</script>